home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 39
/
039.d81
/
color select
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
4KB
|
158 lines
5 sd$=""
6 j=56320
7 mm$(2)="[194]order [157][157][157][157][157]":mm$(3)="[194]ackground"
10 rem color select
20 gosub 10000 : rem current setup
22 :
30 cp=bo:dd$="[194][207][210][196][197][210][146]":op=1
40 gosub 11000 : rem select new border
42 bo=cp
50 :
52 cp=bk:dd$="[194][193][195][203][199][210][207][213][206][196][146]":op=2
60 gosub 11000 : rem select new bk'grnd
62 bk=cp
70 :
72 cp=te:dd$="[212][197][216][212][146]":op=3
80 gosub 11000 : rem select new text
82 te=cp
84 ifbk=tethengosub30000:goto20
90 gosub 12000 : rem are these ok
92 ifnot(ok)then30
94 :
100 gosub 15000: rem current side
102 sb=si : rem side booted
105 ns=2 : rem number of sides
110 cs=1
120 gosub13000 : rem write data to file
130 cs=cs+1 : rem on side cs
140 ifcs<=nsthen120
150 :
160 gosub14000 : rem put side sb in
10000 rem get current setup
10010 open15,8,15,"i0"
10020 open3,8,4,"setup"
10030 input#3,d$(1),d$(2),d$(3),d$(4),d$(5),d$(6),d$(7)
10040 bo=val(d$(1))
10042 bk=val(d$(2))
10044 te=val(d$(3))
10046 close3:close15
10050 return
10060 :
11000 rem select new something...
11005 print"[147]"
11010 print"":poke646,te
11020 poke53280,bo:poke53281,bk
11030 aa$="[211]elect new "+dd$+" color":printspc(20-len(aa$)/2)aa$
11032 print" by moving arrow with"
11040 print" joystick or cursor keys. [212]o select a"
11050 print" color, press [[211][208][193][195][197]] or [198][201][210][197][194][213][212][212][207][206]."
11055 if(op<>1)thenprint" [208]ress [198]1 to re-select "mm$(op)".":goto11060
11056 print" [160]"
11060 print""spc(10)"[208]ress '_' to exit."
11070 :
11080 printsd$;
11090 forx=0to15:poke646,x:print" ";:next:print"[146]"
11095 poke646,te
11100 :
11110 printsd$""spc(cp)"^"
11120 :
11130 jy=peek(j):ifjy=127andpeek(198)=0then11130
11140 geta$
11145 if(a$="[133]")and(op<>1)thenop=op-1:goto11260
11150 ifjy=111ora$=chr$(32)then11240
11155 ifa$="_"thengosub20000:goto11005
11160 :
11170 ifjy=123ora$="[157]"ora$=""thenprintsd$""spc(cp)" ":cp=cp-1:mm=-1:goto11190
11180 ifjy=119ora$=""thenprintsd$""spc(cp)" ":cp=cp+1:mm=1:goto11190
11185 goto11130
11190 gosub16000:rem make sure text and background aren't the same
11192 ifcp<0thencp=15
11195 ifcp<0thencp=15
11200 ifcp>15thencp=0
11210 printsd$""spc(cp)"^"
11215 ifop=1thenbo=cp
11216 ifop=2thenbk=cp
11217 ifop=3thente=cp
11220 goto11010
11230 :
11240 return
11250 :
11260 printsd$""spc(cp)" "
11270 onopgoto30,52,72
12000 rem these ok
12005 :
12010 print"[147] [193]re these settings what you want ([217]/[206])?"
12020 poke198,0:wait198,1:geta$
12025 ifa$<>"y"anda$<>"n"then12020
12030 ifa$="y"thenok=-1
12040 ifa$="n"thenok=0
12050 return
13000 rem write data to disk
13010 print"[147][144]":poke53281,1:poke53280,4
13020 print" [208]lease place side #"cs"of [204][207][193][196][211][212][193][210] in"
13025 print" the drive and press [[211][208][193][195][197]]."
13030 poke198,0:wait198,1:geta$:ifa$<>" "then13030
13040 gosub15000: rem what side is it?
13050 ifsi=csthen13100
13060 print" !!! [211]ide #"cs"not found... !!!"
13070 fordl=1to2000:next:goto13000
13080 :
13100 rem ok, write data
13110 open15,8,15,"i0"
13120 d$(1)=mid$(str$(bo),2)
13122 d$(2)=mid$(str$(bk),2)
13124 d$(3)=mid$(str$(te),2)
13130 open3,8,4,"setup":cr$=chr$(13)
13140 print#15,"p"chr$(0)"";
13150 print#3,d$(1)cr$d$(2)cr$d$(3)cr$d$(4)cr$d$(5)cr$d$(6)cr$d$(7)cr$
13160 close3:close15
13170 return
13180 :
13999 end
14000 rem put side one back in
14010 print"[147][144]":poke53281,1:poke53280,4
14020 print" [208]lease place side # 1 of [204][207][193][196][211][212][193][210] in"
14022 print" your drive and press [211][208][193][195][197] to return"
14024 print" to [204][207][193][196][211][212][193][210]."
14030 poke198,0:wait198,1:geta$:ifa$<>" "then14030
14040 gosub15000: rem what side is it?
14050 ifsi=1then14100
14060 print" !!! [211]ide # 1 not found... !!!"
14070 fordl=1to2000:next:goto14000
14080 :
14100 goto60000 : rem connect back
14130 :
15000 rem read current side
15010 open15,8,15,"i0":close15
15020 open2,8,2,"$"
15030 fori=0to156:get#2,a$:next
15040 get#2,a$:si=val(a$):close2
15050 return
15060 :
16000 if(op=1)thenreturn
16001 ifcp>15then16020
16002 ifcp<.then16030
16004 if(bk+mm<>te)and(op=2)thenreturn
16005 if(bk<>te+mm)and(op=3)thenreturn
16008 if(bk<>te+mm)and(op=3)thenreturn
16010 cp=cp+mm
16020 if(cp>15)and(bk=.)and(op=3)thencp=1
16030 if(cp<0)and(te=15)and(op=2)thencp=14
16060 return
20000 rem quit
20010 print"[147] [193]re you sure you want to quit ([217]/[206])?"
20020 poke198,0:wait198,1:geta$
20025 ifa$<>"y"anda$<>"n"then20020
20030 ifa$="y"then60000 : rem quit
20040 ifa$="n"thenreturn
20050 :
30000 rem same background and text
30010 poke53281,1:print"[147][144] [215]hy did you pick the same color for"
30020 print" the [194][193][195][203][199][210][207][213][206][196] and the [212][197][216][212]???"
30030 print" [212]ry picking again..."
30040 fordl=1to3200:next:return
60000 rem return to customize menu
60010 poke646,peek(53281)
60015 print"[147]load"chr$(34)"custom ls boot"chr$(34)",8":print"run"
60020 poke631,13:poke632,13:poke198,2:end